Base Conversions: Converts Numbers From Binmode, Octmode or Hexmode to Decimal and Vice Versa
Description
These functions convert numbers from one base to another.
There are several solutions for this problem out there, but the naming is quite heterogeneous and so
consistent function names might be helpful.
A numeric or character vector of the same length as x containing the converted values.
Binary, octal and decimal values are numeric, hex-values are returned as class hexmode.
Arguments
x
a vector of numbers, resp. alphanumerical representation of numbers (hex), to be converted.
Author
Andri Signorell <andri@signorell.net>
Details
BinToDec converts numbers from binary mode into decimal values. DecToBin does it the other way round.
Oct means octal system and hex hexadecimal.